cleaned up some unnecessary code in typescript.