Main, start logic