Working, cleaned version for final stage