Changes to style and minor overhaul