Handles ID replaces better.
Proper sanitising.