move configuration stuff into relevant class