Allow beforeX and afterX functions on extensions