Added test script, fixed app bug in fbapp