Minor code clean-up

Just some minor code clean up and migration of experimental / fun things to external JS files.

Signed-off-by: Matthew Potter <mdpotter@gmail.com>