No offence but you seem a little naive and/or inexperienced. In addition to the strong recommendation to get your own lawyer now, I would suggest you read "The 48 Laws of Power" by Robert Greene to get a crash course in things people do to try to obtain power. You may begin to see the CTO in your situation in a different light.
HINT: This has nothing to do with your coding ability