Some optimisations/cleanup mainly in static field traversal