Minor editing changes
Converted a dedicated location routine to be generic
Completed writing line data to the database routine