Added a similarity check between commands
Globalized database variables