#40 Code cleanup