Some preparation for deleting files and applications. TODO: Implement actual deleting & deleting image file when deleting image entity, etc.