Refactoring
code format and add license