refactored database to remove imageable as it does not apply anymore
sorted merge conflicts