Add credit functionality & fix some entities.