cleanup of js lint errors and fixed mixed space / tabs / formatting