Refactoring of preprocessing and lexers functions.