Refactor a bunch of baddie tick code