Introduced path recognition in the commands
Menu + logic, refactored frontend logic