Fix compilation errors from git merge. Reomove commented out code