Add documentation to functions and add makeStruct

Move a lot of things around
Add double2voidPtr and voidPtr2double
Fix sizeof for structs
Fix apply for doubles and floats