Merge pull request #33 from zelgerj/master

refactored content getter and moved encoding to prepareContent function