Moved the 'contemplating' bit into a function. I imagine there's a more efficient way to mix the sleep function into that part while it appears to be thinking, so I'll be looking more into that.