Class returning undefined

Please format the code you post here. See this guide.
And check the spelling of your constructor.