minor stuff and add inline preview mode