Removal of unused if conditions, improved parser and format parser matching, changed variable naming a little, code cleanups