Cleaning up the potion code