fixed compilation on visual studio 10; disabled some visual studio 10 warnings; moved more code away from the main header