Prettifying, useless commands removed, changed some unnecessary switches to more manageable if statements and moved a lot of things around.