Add packaging scripts, revamp build scripts