Implemented evaluateScript

Closes #1
Replaces #31 by implementing the method fully based on the updated explicit requirements