Introduce tslint, cleanup refs