fixed mostly everything, still not quite complete