Restructuring. Added go code that i might switch to