Remove some obsolete files
Remove some dead code
Add some assertions