Reintroduced cornerRadius with some performance optimization tricks