documentation, code cleanup