documentation update and code cleanup
updated structure chart