Fixed URL values in the AJAX calls and fixed a URL bug inside the Java code. Other code cleanup