fixed array types to compile

also added some #includes