Starting some unit tests and fixing crash when `new` is omitted