Various commit and code cleanup