Cleaning up code

Moving the different available actions, and giving each a commented
heading. Next I need to make a function to compare arrays so specific
button combos can be used in if() statements.