EXTENSIVE documentation.
added more tests