Template Form code cleaning