Implemented config parsing and pattern matching.