Oct 1 Various fixes to code, still has bugs