Add support for blueprints

Not extensively tested, lacking unit tests. But it seems to do the trick.

Hope it helps.