Cleaned up code by removing some embedded javascript in the twigs to a single js file