As often happens this blog post is very timely for a system where I use PW as a framework and the UI is in custom classes not ProcessWire modules. I was going to use the functions API but sounds like that would be a little more overhead than it needs to be.