Added some more logic for moving pieces