Name changes and documentation

some function and struct name changes
added code documentation for godoc
extended readme with examples
improved tests