Moved major functionality out of models/image.rb into models/sparql_base.rb for better inheritance.