Support LW expansion

Added some supporting code to implement the LW expansion