Added pedantic flag, fixed errors
Put struct definitions in separate header
Put struct definitions in separate header