Librarified!

Put my code for pulse detector into its own library file and sorted out
reconfiguration in index.html.