Fixed issues with library not reloading properly.
Added support for dlls and simplified code.