Clean up private functions