Added comments to explain my mess-ups that could come in handy later.