Tidy-up code, resolve productivity issues