Make init a standalone function