Working on it
Add back type safety and correctness, not quite there