Some more code cleanup
Removed warnings
Code cleanup