improved scaling and grid line generation/destruction