Converted internal storage away from Matrix. Various bug fixes.