#56 refactor related code for updating syntax highlighting on saving file