Added basic caching to server query
brought formating closer to wordpress guidlines