1.8.2.1 - tidy

Made the code a bit cleaner, no real functionality changes.