Moved magic_cache to core & added NS core

Also, updated documentation.