Cleanup and array check #134