Refactored the macros directory and added validation macro