Comment Re:From the asker himself (Score 1) 222
Sounds like this company is not going to be easy to deal with. As many others have advised ... go see a competent lawyer familiar with these issues first.
I have been involved in some similar situations and code ownership is not your only hurdle. You're in a good situation in that you are working for a small company that is probably not well prepared for IP/code ownership disputes. However, most companies are fully prepared for client access issues and you will want to reread your contract looking for clauses that may prevent you from forming business relationships with your target customers. Most companies have language in thier contracts that severly limit employee's ability to perform work for anyone that they have done business for in the past, currently, or in the future. And even if you quit, you most likely will be legally prohibited from competing in thier market for a period of time (6 months to 1 year seems to be very common).
Another thing to think about and do serious research on is to find out about your present company's relationships with your target customers. It may be such an excellent or contractually binding relationship that they wouldn't do business with you anyway to preserve that relationship. This is more common than you might think!
You have to decide just how important this software you have been working on is to you, how realistic are your chances for actually selling it to potential customers are, and how long the opportunity is likely to exist. You may find you can negotiate a job with a competeing company using your software for leverage. In fact, that may be your best bet right now.
Anyway, good luck to you!