Added extra argument to get dataset type from class and use in other
methods
Corrected use of check slice and cleaned up code
Cleaned up white spaces and namespace
Fixed to remove IDE error