Initial code for a global dependency on lan. Very much incomplete.