Changes:

Add test file,
Fix more of scanline_encode