Created a proper JS class