initial commit
Perhaps working
Various fixes