added documentation for main function.
removed unused attribute