Merge our code bases (preliminary)

Many, many additions/improvements. 

Docs need to be updated and I haven't run the tests yet, so this is probably a bit premature, although it works great on a production app.

If you could at least scan the code for now and give feedback that would be great.