Pulled functionality into a class.
Removed __name__ == __main__ stuff at the bottom.
Forgot to save this change with last commit.
Set up object's attributes.