Refactor and simplify wlc's internal workings and data structures.