Respond to Brandon's concerns: improve comments and generic typing