added dist build fixes and publish command - needs some work on internal links yet.