Refactored the commands, added a database and directory command