Van code refactored