Cleaned up code to keep lines less than 80 characters