Link up main and fix a namespace issue