minor fixes, improvements, simplified rmacro