Code cleanup
Merged changes