Added initialization function for levels