Added original app factory code
Added examples to the readme doc