Updated toolset. Implemented main function