Light refactor and cleanup