Cleaned random rat movement code