Ensure angular displays latest changes.

- Calling $apply() after reading latest values.
- Also move refresh interval to scoped variable.
Fix some styles.