Accept longs as well as ints

Added some basic tests