add some comments, remove unnecessary code
comments + descriptive text in pages, plus reorg