Added tank and pipe optimisations.