Applied naming conventions and refactored output to return dict/arrays instead of numpy.array. Unit tested