More improvements
Some code cleanups