Changed method of attaching CSS to DOM