Minor bug Fixes
Cleaned up all warnings