Automated the process and some cleaning