Prepare packaging and add some tests