Added tests. Temporarily worked around table bug. Probably fixed count.