Merge pull request #21 from zpbx/dev

Update building script.
Tiny optimizations.