Remove custom code and use the `once` library instead