Clean up js & templates