Cleaning up my code - call it a learning experience.