cleaned warning while compiling and some dead code