minor refactor & formating changes