Fixed #48 -- code documented and clarifyied