Pop3 server refactored towards functional style