Refactor of building process.