TODO and style fixes