Everything you have done was with good intentions. However, it is likely that you didn't communicate your ideas in a way that your coworkers/boss appreciated. Let me highly recommend the book
People Skills (Amazon link); it might be too late for this job, but it helped me out tremendously in gaining the respect/trust of a difficult boss.