Separated tests per theme, refactoring and cleanup