Coordinate transformation for silhouette cameo, and some minor refactoring.

Please review and merge