Adds a bot manager class.

Also cleans up the program.cs quite a bit and adds a bit more error
checking than before.