Refactored LockFile parsing

Not sure why so many commits are showing up in this PR - perhaps because my fork was a bit out of date?