Added Sprite Resource

Added the sprite resource type, and also made the resource chooser more
general, plus some general bugfixes.