Improved documentation and fixed parsing