eval.js improvements

Made eval readable and modular