remove messages count, remove messages cleaning, added SSL support