Better dynamic command registration, thanks to @CaptainBern