Added methods (init, add, getAll, clear) and property (count) to favorites.js.