flux core

translated to coffee from https://github.com/lipsmack/flux