Document main method

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