Parser: code update and cleanup.