bugfixes, code cleanup, set animation w/ direction from input