Warnings & C++11

Fix a ton of warnings,
Use C++11 (by Ericson2314)