Support public=None
Remove unused code