Code cleanup and updates
Code cleanup and updates