Split util into seperate file
Split client and server code into different files