reduce number of ajax calls to show target preview. remove dead code.