Restructured to separate .js files, made functions more ObjectOrientified

Allows for clicking on title to regenerate items