fix remove mock dependency + code cleanup