Works better now. Still need to fix the macro declarations.