Code cleanup before main branch merge