more comments and cleanup
update structure