Fix (almost) all warnings
Merge pull request #111 from tomaka/fix-warnings

Fix (almost) all warnings