Small fixes. Removed dead code.