Console.log fix if it doesn't exist
Implemented AJAX and tidied up the dates