Fix issue #8 - missing $apply calls
Decouple txns. Just add $apply calls.
Fix minor indentation issue.
Merge pull request #9 from GoDisco/missing_apply_calls

Fix issue #8 - missing $apply calls