Add logger. Modularize ws handlers.