Implemented Caleb's code revision suggestions.