Set up the main framework for the code