Drastically improve database implementation (most things playable now)