Register Scripts

Moved some javascript over into registerScript function calls. Also
altered the way the hr page is presented.