Slight refactoring - mostly formating