Restructure the client to be built as a module rather than just being
used as local files.