Added config parsing, minor changes
Fixed config parser, logging code