Further refactoring
Further refactoring

Code currently not very operational, in the middle of being migrated to
new model

wakermahmud/cryptocat,b4zz4/Barricada,arno01/cryptocat,b4zz4/Barricada,DoNotUseThisCodeJUSTFORKS/cryptocat,PeterDaveHello/cryptocat,wakermahmud/cryptocat,DGO143/cryptocat,DGO143/cryptocat,b4zz4/Barricada,Cryptodog/cryptocat,arno01/cryptocat,DGO143/cryptocat,Cryptodog/cryptocat,DoNotUseThisCodeJUSTFORKS/cryptocat,b4zz4/Barricada,Raynes/cryptocat,Raynes/cryptocat,PeterDaveHello/cryptocat,Raynes/cryptocat,DoNotUseThisCodeJUSTFORKS/cryptocat