I tend to agree, the only winners in legal battles are solicitors and you need to check the copyright clauses in your contract.
Don't quote me on this, but under Australian law any code written for a client belongs to that client unless explicitly contracted otherwise (in a copyright sense)
Cheers
John
To move a mountain start with the smallest stone