Hook into events to perform operation on save

Now allows configurable tabification or untabification on save.