Refactor packages
Fix global permission checking
Implement custom nodes in main API