Remove dead code and update license