fresh native libs, code cleanup, small fixes