ported over the old MTPS client gh-48
removed some old code