Fix tslint, and clean up all tslint errors. Close #411