Uplifted to Visual Studio 2013, fixed some ReSharper warnings
Added some basic unit tests for emulator