Main refactoring previous to add new nikoniko feature