finish master merge, update optimize script to maintain data-main