Finished refactoring appsfragment.tex