Added macro hack to attach member functions in a nicer looking way.