Move intenal macros to detail subdirectory