Refactor data adapter code

Refactoring data adapter code to better conform to JS coding conventions