Added defensive coding by allowing the given value to be trimmed
Added "close" as an alias to exit