Typos, better assertions, dead code

@sjrd @odersky  please review