Made slim template cleaner and more efficient