Refactored functions
Added contentElement option
Added the cache class