Moved access related functionality to separate file.