more cleanup and metadata support for web interface