fix input bug
slight cleanup
fix animend event
added debug info