Added lots of documentation and behavioral description