Start main after all resources are loaded