Code clean up templates