Added canMove and related functions