Move functionality to tick event, remove command event