Removed rendering delay and small code cleanups.