Generate package source and tests