Fix some warnings
Add some new warnings
Fix some compiler warnings
Improve documentation