Rename variables and change data type to more closely match satin.c.