Switched to constructor and polyfill approach