Fixed any compilation errors after modifications, fixed tabs and some formatting.