4.0 Update. Allow optional commands and custom replacments.