implemented extra_app_scripts option
add another test, fix bug