Moving GPL to pymt_server.cpp
Adding util functions
Fixing tests to make them runnable