[IMP] Removed some useless code, refactoring