Fixed many small bugs.
Added tests for observable collection.