Fixed a small bug, added inline
Moved DEFINE_FUNCTOR macro definition here