Changed the inner classes to be non-static