Move nested decls to be traversed first
Fix copyright
Make dodo's compile into a class for easier extension