More refactoring (#22)