Removal of more legacy code. To simpligy and include new unit tests.