explain files in this directory
refactor macros to library