More accurate wrap edge handling + TODO placeholder