small update on view logic
Added ability to add arbitrary primary keys
cleanup work