Cleaned up some code and changed build.gradle to build against sdk 14-18