Good point. The resulting code is much cleaner. Rewritten.