Move functions and classes to the front of the file
Hide parsing behind 'if __name__ == "__main__"'
Factor out the writing to a file
Fix skippable_block_of_four to actually use its parameters
Create class to contain the results of parsing the file