Added macra and functions.