Made client a library and added a separate executable