More warning removal

Most warning removed

Unused code removed