Added getAll function and changed methods to return a function instead