Added constructor to handle config on instantiation