* Added first centralized database config and added machine self-registration into db * Fix database migration with new database * Refactor