Conf and files management refactored, also closes #1