Document main method

I documented main method for you. Please accept! :)