Make init more generic