Fix type in datatype, remove unused prototypes