Splitting code into simple and graal version.