Creation of class, seperation of files.

As requested on reddit, here is what it would look like if the bot were made into a class, and given its own file.