Cleaning

Cleaned house and added comments to functions.js
Cleanup

Further house cleaning.