Refactor Code + add some small feature