Added repeat and unimpaired, tidied up commands