Joins item and inventory tables on inventory queries

Switches the inventory query to a inner join with the item table by match the item IDs. Some formatting for consistency in every Java file.