Upgraded project to VS2012
Tweaked project settings
Fixed incorrect state logic