Changed some interfaces to anonymous inner classes