Added parameters to enable environment specific options. Moved server initialisation within the init method so it only starts the server when init is called