Refactoring of db relations for status page and project.