Moving code to the client