Move preloading of assets to its own state