Javascript's Array.splice is really useless. This makes it better.