Cleaned up the code (bonus).