#2 Speed up SQL constructions
Imports optimized and code reformatted.
#2 Speed up SQL constructions
Minor changes after code inspection.