Cleared up code, increased readability