Added version 4 changes and set lwm to 4.