Removed file IO and used Func to get markdown