Some bigger refactorings. But still plenty of old stuff to change/delete.