Refactored all views, states and styles.