* fixed bug that would only read file in two byte steps, sometimes
missing markers
 * refactored some methods