Added few comment, shaky caching and error catching