Refactor and beautify code
Change namespace