Added doc strings and fixed quit error.