Code cleanup after refactor