Add support of upstream, daily build and Refine several patches