Minor updates to number formatting and fixed index out of bound issues.