Added some more error-checking to the move method, along with associated tests.