Added visibilty attributes and macros