A refactoring branch of MIT OpenBlocks. Pull requests very welcome.