Worker Class

Created worker class with the main function.