updated unit tests to reflect file mode fix
added missing abstract modifier
reworked LooseObject parsing to be more pattern-matching-oriented