Some more cleanup of api