fixes #74 and adds documentation

fixes #74 by now working with both . and : notation.

Also added quite some documentation comments. Please review carefully before merging, I'm not too confident it is all correct.