Fixed boundary issues, added a check to stop translation, and implemented a start key 'S'