Add more comments and consitency

Added a lot of comments
Swapped some functions around for more consistency in the code
fixed a bug in the new controller commands