Some clean up and minor adjustments