move getClasses to new ClassLoader lib and generalize it