Break out js for greater scalability