Refactor #build into private methods for clarity
Fix missing require