major refactor and restyle