levels: add link_levels helper
core: initialize global level object to none