Defined, crated and implemented. Code refactorin, optimization, syncing with DB