Added getapps and refactor to be W3C compliant