Fixed merge problems and removed more obsolete