Improve build code and add clean task