Client: Cleaned up code