Various clean ups

Fixed regression in PostGrid js. Changed singleton implementation.