Code Cleanup

move all possible includes to cpp files
fix some warnings on Windows