Some small fixes. Mostly working. Needs tuneing.