Fix compiler errors, not done refactoring