Revamp the utility functions.
Move some initialization calls into the `initialize()` method.
Deallocate the pointers.
Implement the viewport size logic.