merged latest lwf and swf2lwf.