split koala behavior into class

Everything should be updated to use the new variables.
Merge branch 'master' of https://github.com/130610/sd-project