Move structure definitions
Replace abort by exit
Add copyright
Add Get and Set functions
Correct return type of some functions