improved BeanLoader class