Some improvements

 * Remove unused struct elements
 * Rename some things
 * Reuse more code
 * Use 512 byte read buffer
Merge pull request #15 from Philipp15b/improvements

Some improvements