Minor bug fix with array size and added a couple of new functions.