Refactor part of the interpeter

This change has the following edits:
* Overload setReg for integer values
* Factor out certain binary operations
* Remove toString calls
* Factor out value lookup