Fixed dependencies
Better update for records
refactoring