prettied up the build_views_file method for readability.