restructed, added tests, added config file for require