refactored eval to be easier to follow

I'm starting to think eval is going to just turn into a bit of a rat's
nest... but I guess I'll try my best to prevent that