Cleaned up code

Made isLeapYear more efficient by doing it in one line and fixed code so
it will conform to syntax requirements on other compilers that are not
as lenient as VS C Compiler.