Moves more statements to functions

Clear is now a function. Also improves displaying, setting, python to
rabbit conversion.