add scalar_floor(...)
add grid drawing, cleanup C edit code