Code cleanup

Modified many of the DllImports so when they parameter in the C code accepts
size_t the DllImport is passing a UIntPtr.  UIntPtr have the same width as
the native memory of the machine they are running on same as size_t just like
size_t they also are unsigned.

Removed a few DllImports of code that were not longer beeing used anywhere in
the code.

Change-Id: I5572283ec208c1980a7d0eb370415615a0cf954d