created __construct functions

The main objects have started needing to have a few things set to do any work, configuration being the most common one. Rather than checking everywhere that these values are set, I created __construct functions to take the values in.