Move some static parts to global scope.
Fix the year finding method.