TODO items on testing table creations added into comments
refactored locMerge script into its own function
extended comment on unit testing and design to eliminate
refactored temp table creation