Move initialize code from stylesheet