added configuration class and moved all config stuff to it