Formatting, interfaces and cleanup