Adding basic knapsack, minor fixes