Added some comments
Moved a code and added a comment for resetting a flag for remode move