Fixed incorrect way of checking existing element in jquery
Removed calls to console.log