Cleanup

Cleaned up a lot of code in inventoryactivity