Even more code cleanup