Renamed pre and postMessage to before and after