added tests, autowired option, createInstance method; typos