Adding comments to code. Some JSHint fixes.
Response refactored to seperate partial html file.