Added stuff from toolsLWA4