wip
Pretty close to final now I think.