Minor code cleanup (removed old and deprecated things)