add documentation. remove spurious code. fix musical error in an input file.