Master code -- final repository