More improvements

Bit of refactoring and removing of code