Generalized some functions to make them usable for the Bot Large challenge. Also refactored some code a bit.
Copied some functions to their own files to make them easier to copy/paste while Hacker Rank adds support for multiple file submits.