refactored .getFunctions() public method
started adding unit tests