Started to optimize script