First Run changes

After first run made some changes to the functions and how they pass
parameters to the dll function calls. Also added a api reference.