Add some comments and refactor the code

-add some comments to the mainActivity to clear up
on what this stuff does
-put the code that was in the wrong method into the
right method