Main function can now run async