Better implementation of init