Some code cleanup
Latest changes