#7 Code cleanup