Added better use of cache

Also removed getSource(). I don't think we use it?