Simplified and unified base repository constructor.