Restructure of the code to make it better organised
Added package json to get it installable
Updated to use packed pixel values to speed up processing