okapi-web

This function is way too big. Try decomposing it into smaller functions that are easier to understand.