Move to KVO and refactor