Rename handler -> controller and implement __len__ method for SearchTrie