small tweaks

Converted masks to bool type instead of int (hopefully more memory
efficient) and improved the part of the test script that handles
plotting.