Updated go doc and moved main func to main.go