a little cleanup and documentation