a bit of code cleanup and documentation