refactor schema and provider module
rm database module
refactor tests