clean up js & templates