Initial setup of engine, branches from here on