Cleanup

 - [x] Drop obsolete members
 - [x] Fix some issues pinpointed by Code Analysis
 - [x] Upgrade to .Net 4.0
 - [ ] Review