Add code fixes for 3.1 support and tidy up admin interface a bit
Remove legacy files