Improved regexp escape handling.
Adding a few more core functions.
Fixing the definition of dec.