Refactor & APN Implementation

- Refactor code to allow easier support and management.
- Added initial APN implementation.