Made main into a class for ease of use.