dev/fix-warnings

Fixes warnings across the project. It's clean on Linux with GCC 4.9 now.