refactor chemicalformula and split formula_parser in separate header file and move into adportable