Minor improvements across source code