[#179] further cleaning/code refactoring