client is now fully modular, removed global singleton, various other fixes