Defining methods under lib folders

Defining the methods under the server folder, and then the method stubs again under the client folder, seems like a lot of code replication.

Would it be feasible to define the methods under the lib folder?