Reorganized the lib, added gradle build and target api 18.