Format code. Part 1. And some polish.