Basic implementation of pre- and post-processing blocks

Tested in a client application, working well.