refactoring some regex
added basic validation for NaN
major refactor in compiling and added some validations