view remove function added and minor changes in template