Improved documentation and removed unused state store code