Implemented a tree-based menu instead of whatever I had before