Reorg. Split into app and lib.
Merge pull request #5 from pachondi/reorg_by_riaz

Reorg. Split into app and lib.