Adding generator conditionals and improving file structure