Adding the initialisation code and needed functions to the jack::engine struct. Not yet done the cleanup code.