Replaced sscanf with own parser for a big performance gain