Wrote some CGLobject code and tests