change get_style_dir to get_template_dir for child themes, move project loop to separate file