Refactor Builder and fix issues