Restrucutred and fixed the builds