Restructed and cleaned up for source builds

Also made some updates for enterprise package install.
Some things may be broken.