Cleanup

Removed pre C++11 stuff, fixed warnings/errors