Code organization. Move pointer definitions to a separate module. Some cleanup.