Some more project refactoring and added first tests