CTO vs. VP of Engineering
dennykmiu: It sounds like from what you are describing, you are more like the VP of Engineering and less the CTO of the company.  VP of Engineering should report directly to the CEO and should be responsible for the entire engineering staff, similar to the VP of Sales who also reports directly to the CEO and should be responsible for the entire sales staff.  If the CEO believes that he needs a new VP of Engineering, then essentially he is telling you that he is not happy with your performance and he needs to replace you.