moved javascript to separate file and converted html to jade