fix small bug in wfloader
lots of todo cleanup