Start implementing unique contraints and caching