some formatting and cleanup