Add openlib. Not quite working. Problem with registering functions.