FIX: Issue where the size of the tree was not sufficient
REF: Moved from an implementation using vectors to one using normal arrays