Rewrited Blocs. Included DB and Errorhandling into app