Formatting and cleanup