implemented format_year method, refactored several other methods, added integration and unit tests