some formatting and minor renaming