Added iframes, refactored code, improved maintainability