Move helper types and function to separate files

* types -> node.go
* functions -> util.go

+ spring cleaning
Reconfigure Travis CI to build under Mac OS X