buildings routine and minor fixes
merge application_controller