Refactor config
Added Spell model
Added database tools
Add initial api