Get tests passing

Fixes issues that were causing tests to pass. Still not working on the javascript level, but tests work.