Added Buffer to window scope to make jsonparse happy. minor tweaks.