various refactorings and achievements