added better support for app path, added config support, some unit tests