Added autocommands support (still unused and untested)