Refactoring structure & adding memcached script