Db changes and fixing credit processes