Split the setup

Split the setup function as change in order of class instantiation
would mess up the run.