Cleaned up code a bit

cleaned code for readability