Do bookshelves around an enchantment table make the enchantments better?
Solution 1:
Yes. The wiki has an in-depth article on the mechanics, but the very essence is that bookshelves placed within a 5x5 ring centered on the table, on the same level as the table and 1 level above contribute to the enchant level. Up to 15 bookshelves matter. Their distribution within that ring doesn't matter; what matters is that there's nothing between them and the table (within the 3x3, 2 tall ring around the table) - only air; no torches, no tall grass, no snow layers, no carpets etc.
The effect of adding the bookshelves is apparent as the cost of enchantment (in levels) increases - once your bottom slot enchantment requires you to have 30 levels, you have maxed out the enchanting setup.
Note this is still random - probabilities change, but you can still occasionally get scrub enchantments in max tier setup. Also, some basic, simple but useful enchantments are phased out and replaced by high-level low-usefulness enchants like Impaling V or Bane of Anthropods IV.