Better organise code. Added bot class.