Fix misc errors

Honestly I'm utterly baffled as to how this compiled
Move option parsing into main
Add copyright header to util.rs