Remove unnecessary requires from examples
Fix style issues in api.lua