Added invert_colors + a few bugfixes and helpers