restructured and major rebuild for build & deployment