Split up some code in the client folder