Fix for hiding MediaPath and ThumbnailPath sent to client
Some minor refactorings