moved all client logic into client folder