Code cleanup. Doesn't flicker anymore!