Clarify code

Add comments, remove two unused variables and rename objects to make it clearer what is an instance and what is a class.
Replace jQuery ajax calls with pure JS

This was done to help my understanding of how ajax works.