Delete nulls from Array

In response to #8 (which can still be merged later if we want)

This does not change the current behavior at all, it just makes the behavior clear in the tests since it's untested. The second commit is a refactor.