diverse refactorings; added datatypes header