Public before and after method.