Remove dead code and add aesthetic changes