Code cleanup and start from BAT1