Improve styles and remove ambiguous code