Issue #1: Tidied up and removed old code.