Split record parsing into seperate functions and some pep8 changes