More refactoring, cleaner code, macros, template to handle optional params (not fully implemented).