Sectioned off the miscellaneous routines for different parts of the program.