code review fixes 1/3
configuration moved to separate class