Refactored formula parser to separate project