Formatting code, small enhancements