Removed direct access of ivars and changed it to using setters/getters