Refactoring all stuffs