VID-2142 Updated docs, fixed logic and rmeoved unused code