Dimmer and correct circuit

That looks good - except for that ground connection on the mains voltage side. That has to go.