Changed the naming of some structs, function, variables,...
Reduced some redundant code
Overall improvements