use model class instead of hash
update style
remove unused tests