JavaScript class project