added some documentation and renamed some fuctions to avoid namespace colisions.
Updated soem function names, fixed conversion of array types