Some more abstraction and encapsulation