Refactor code to work with Enraged Koala