Refactoring

Removed code causing compilation errors and warnings