Added tests for views.

Modified package view and routes a bit to avoid getting package
ids in tuples.