Very good idea. Makes it cleaner and more testable. I'll prepare a commit.