Added error for commands that don't support ranges, tidied up range code