add `initWithURL` method and make some properties public