Fleshed out beta versions

added more logic to sg_build and streamlined res_build.

Ready to test on a live systems