Add pre and post hooks and utils