Fixed exit command and added toLower function