minor cleanup
move configuration parsing into its own module
simplify