Another code cleanup

Removed redundant functions and gave friendlier names to some of the
earlier functions.  :)