move code from lib/ into app.'s, simplify the readme