Improved entity repositories