formatting and clean up of static_pages.js