Preview functionality and other changes