now properly grabbing configuration settings, changed a bunch of other stuff