Reorganizing macro files

Making macro files by function not data type.