The karma function in app.py is huge and should be broken down into helper functions. Note that there are also issues open where we need a slack_client.py file and a logger file, so for this issue, create helper functions in app.py for things not related to talking to slack or logging.
For example, the "karma math" could be its own helper function(s):

You could maybe even make a Karma class, with value and was_corrected attributes, potentially!