Modified anon functions for legibility. Renamed functions. Added consistent abstraction level. Baptized the regex.