Added advertise and publish functions and basic usage example