Added a bit of encapsulation