Added comments, removed startup code from main code.