Refactored leap year app to abide by leap year logic