More code additions and refactoring. Most structre in place. Zero function testing, not expected to work at all.