Removed console.logs, deprectated function