Fix and refactor buildout
Fix and refactor buildout