Fixed class declaration & missing prototypes