Indent.
Javadocs and indenting.
Fix fd leak