Main code setup