Changing some fields to long instead of int as int might be too small. Added some more documentation.