Initial mods with debug stuff
Added matrix scaling. Added examples.