refactoring; fixed application.ini not found issue; made generate_partials more generic