Started rewriting to typescript, basefiles added