Setting up functions for Client.js