Rework class instantiation

- Change “new” to “init”; the latter can take arguments and should
simply initialize the given instance, whereas the former would return a
new instance.
- Add generic instantiate function