Made a number of improvements added some ajax.