fixed a sound issue, move some macros to settings file