removed pointless functions, added macro

Tried to do this earlier, but github desktop was not working.