Lot of changes and extra code. This setup is working perfectly.