Base code for client GUI and image loading.