Refactor Client into Application Class