last commit depends on these changes. Move some type functionality into laser_types.cpp/h so it can be used with the reader about to be added. macroerror.h defines error codes for macrowriter