Fixed before/after and added support for chaining