Gom install

Hi, I've made some fixes/improvements for gom install. See the commit messages for more details.