added some testing notes, fixed a bug in keysToArray
Cleaned up code, moved tests to a dedicated test script