[#33] Some refactoring