Add code suggestions from @nictuku