* main.go: remove unused structure interval.
Make the code more ideomatic Go: camel case function names, comments.