revert strategic fixes and fixed compilation errors