reorganized all code into client folder