Fixed the main issue and some of the detailed questions based on last comment. Still working on other details.