added requirements and code template and much of the javascript added