Reworked parser and translation layer