Updated CGIKit for more robust code