Issue #3264197 by gaurav.kapoor: Fix CS issues, internal documentation, remove deprecated functions and refactor code