refactor a few things for conformity and clarity