parse-contents: Code clean-up