Changed EmuDatabase class to hopefully make it more effecient later