Fixed JSHint errors. Updated console logging