Fixed bug aborting playback before content buffered; Refactoring