refactored sockets to serialize events
fixed bug regarding tabs and pictures