Removes unused code and adds missing factory test