fixing end period behavior and added delete team and rules functionality