Merged "Code cleanup"