Building test and refactoring