Working on api 8 + some refactoring

`new Scanner(inputStream).useDelimiter("\\A").next();` from http://stackoverflow.com/a/5445161/2183804