Numbers

Hi,
I've added ability to pack negative integers and fixed some issues with numbers (crashes with unsigned integers packing, doubles packing). Refactored code a little bit. I've also added tests covering every change and a few tests to confirm that existing code works properly.