added API documentation to demo page.