Improve macro system