Major update

Cleaned-up code, remove unnecessary files, added comments, and
simplified the mastertemp features.