Add parsing of 'on', clean up code