some clean up work
Optimised buill process