Remove unused code and fix preview link