refactored maaany things, added conf by xml, not yet working