Some minor changes, removed unnecessary code

Some minor changes, removed unnecessary code