Code cleanup. Compatibility with Orchard v1.7. Update to VS2012