Add function to create scaling matrices
Kill obsolete macros