Adding watchCollection and fixing bugs