Commit of existing code base

Existing code from a few hack and tweak attempts