Added first version of a simple API for menu structure

Not sure about having it nested yet. Maybe we can do it step for step, without the stress of huge pull requests?