Implemented selection process.
TODO: DB storage and consensus level.