Moved configuration to json. added more documentation.