Initial import
Fix compilation errors/warnings