Optimize parsing of variables