Optimising manifest size and a bit of cleanup