Modularize the binary-installing logic better