Some code refactor and adds style to backend