Fixed tests for lw&sw
Added comments & cleanup