plenty of refactoring to make things work with wand and to lay some groundwork for other image filters