Moved all parsing functions to a separate file