Refactored class/instance configuration (since it didnt quite work!)