clean up interpreter code and move tests out