Added the publish functionality - still alpha version