Improvements:
- no more inject
- switches view now works again
- errors now go to the correct line number

Still more work needs to be done though to get everything working.