Save and load search queries; refactor invent and improve views and controllers