Lots of updates. Started on API for possible plugin system