First GIT attempt. Contains mods for ticket-1556