Code cleanup/style/duplication