[refactor] Major rewrite to introduce `OnDemand` parsing
[refactor] Make the update function more generalized
[refactor] Make the regexps moar readable