Cleaned up code. Decided against adding array support as it would break a number of older tests. Done.