Minor clean ups, this version still does not pass tests