Modified parser and distances to modularise functions